<!-- 种群健康证明，新增 -->
<template>
    <el-drawer
        :model-value="isShowAdd"
        size="800"
        :show-close="false"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
    >
        <template #header>
            <strong style="font-weight: bold; color: #000;">新增健康证明</strong>
        </template>
        <template #default>
            <el-form :model="form" label-width="auto" style="max-width: 800px">
                <el-form-item label="送检日期">
                    <el-date-picker style="width: 100%;" v-model="name" type="date" placeholder="请选择送检日期" />
                </el-form-item>
                <el-form-item label="检测机构">
                    <el-input v-model="form.name" placeholder="应经省级以上动物防疫机构检测" />
                </el-form-item>
                <el-form-item label="布鲁氏菌抗体检测">
                    <div style="width: 100%;">
                        <el-input style="width: 48%; margin-right: 4%;" v-model="form.name"><template #prepend>阴性率(%)</template></el-input>
                        <el-input style="width: 48%;" v-model="form.name"><template #prepend>阳性率(%)</template></el-input>
                    </div>
                </el-form-item>
                <el-form-item label="牛结核病">
                    <div style="width: 100%;">
                        <el-input style="width: 48%; margin-right: 4%;" v-model="form.name"><template #prepend>阴性率(%)</template></el-input>
                        <el-input style="width: 48%;" v-model="form.name"><template #prepend>阳性率(%)</template></el-input>
                    </div>
                </el-form-item>
                <el-form-item label="口蹄疫免疫抗体">
                    <el-input v-model="form.name"><template #prepend>合格率(%)</template></el-input>
                </el-form-item>
                <el-form-item label="口蹄疫病原学检测">
                    <div style="width: 100%;">
                        <el-input style="width: 48%; margin-right: 4%;" v-model="form.name"><template #prepend>阴性率(%)</template></el-input>
                        <el-input style="width: 48%;" v-model="form.name"><template #prepend>阳性率(%)</template></el-input>
                    </div>
                </el-form-item>
                <el-form-item label="上传化验报告">
                    <el-upload 
                        class="upload-demo" 
                        action=""
                    >
                        <el-button type="primary">选择文件</el-button>
                    </el-upload>
                </el-form-item>
            </el-form>
        </template>
        <template #footer>
            <div class="dialog-footer">
                <el-button @click="cancelHandler">取消</el-button>
                <el-button type="primary" @click="confirmHandler">保存</el-button>
            </div>
        </template>
    </el-drawer>
</template>

<script setup>
import { reactive } from 'vue'


let props = defineProps(['isShowAdd']) // 接收父组件的数据
let $emit = defineEmits(['closeAddDrawer']) // 自定义事件

// 表单收集
const form = reactive({
    name: ''
})

// 取消按钮
const cancelHandler = () => {
    $emit('closeAddDrawer', false)
}

// 保存按钮
const confirmHandler = () => {
    $emit('closeAddDrawer', false)
}
</script>

<style scoped lang="scss">

</style>